home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Whiteline: delta
/
whiteline CD Series - delta.iso
/
systems
/
minix
/
bash1141.zoo
/
Diffs
Wrap
Text File
|
1994-07-26
|
34KB
|
1,056 lines
diff -u2r orig/builtins/Makefile ./builtins/Makefile
--- orig/builtins/Makefile Thu Jul 7 17:31:06 1994
+++ ./builtins/Makefile Sun Jul 24 11:44:50 1994
@@ -45,5 +45,5 @@
$(srcdir)/times.def $(srcdir)/trap.def $(srcdir)/type.def \
$(srcdir)/ulimit.def $(srcdir)/umask.def $(srcdir)/wait.def \
- $(srcdir)/reserved.def
+ $(srcdir)/reserved.def $(srcdir)/gem.def
STATIC_SOURCE = common.c getopt.c bashgetopt.c getopt.h
@@ -55,5 +55,5 @@
let.o read.o return.o set.o setattr.o shift.o source.o \
suspend.o test.o times.o trap.o type.o ulimit.o umask.o \
- wait.o getopts.o getopt.o bashgetopt.o
+ wait.o getopts.o getopt.o bashgetopt.o gem.o
THINGS_TO_TAR = $(DEFS) $(STATIC_SOURCE) Makefile ChangeLog
@@ -65,5 +65,5 @@
libbuiltins.a: $(MKBUILTINS) $(OFILES)
$(RM) $@
- $(AR) cq $@ $(OFILES)
+ $(AR) crs $@ $(OFILES)
-if [ -f "$(RANLIB)" ]; then $(RANLIB) $@; fi
@@ -130,4 +130,5 @@
getopts.o: getopts.def
reserved.o: reserved.def
+gem.o: gem.def
common.o: ../shell.h ../command.h ../config.h ../memalloc.h ../general.h
@@ -254,4 +255,7 @@
wait.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
wait.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
+gem.o: ../command.h ../config.h ../memalloc.h ../error.h ../general.h
+gem.o: ../quit.h ../dispose_cmd.h ../make_cmd.h ../subst.h ../externs.h
+gem.o: ../shell.h ../unwind_prot.h ../variables.h ../maxpath.h
bashgetopt.o: ../bashansi.h ../ansi_stdlib.h
diff -u2r orig/builtins/cd.def ./builtins/cd.def
--- orig/builtins/cd.def Thu Jun 2 15:35:30 1994
+++ ./builtins/cd.def Fri Jun 3 23:12:16 1994
@@ -250,12 +250,12 @@
directory. With no arguments, exchanges the top two directories.
-+n Rotates the stack so that the Nth directory (counting
- from the left of the list shown by `dirs') is at the top.
++n Rotates the stack so that the Nth directory (counting
+ from the left of the list shown by `dirs') is at the top.
--n Rotates the stack so that the Nth directory (counting
- from the right) is at the top.
+-n Rotates the stack so that the Nth directory (counting
+ from the right) is at the top.
-dir adds DIR to the directory stack at the top, making it the
- new current working directory.
+dir adds DIR to the directory stack at the top, making it the
+ new current working directory.
You can see the directory stack with the `dirs' command.
@@ -513,11 +513,11 @@
top directory.
-+n removes the Nth entry counting from the left of the list
- shown by `dirs', starting with zero. For example: `popd +0'
- removes the first directory, `popd +1' the second.
-
--n removes the Nth entry counting from the right of the list
- shown by `dirs', starting with zero. For example: `popd -0'
- removes the last directory, `popd -1' the next to last.
++n removes the Nth entry counting from the left of the list
+ shown by `dirs', starting with zero. For example: `popd +0'
+ removes the first directory, `popd +1' the second.
+
+-n removes the Nth entry counting from the right of the list
+ shown by `dirs', starting with zero. For example: `popd -0'
+ removes the last directory, `popd -1' the next to last.
You can see the directory stack with the `dirs' command.
diff -u2r orig/builtins/echo.def ./builtins/echo.def
--- orig/builtins/echo.def Thu Jun 2 15:35:30 1994
+++ ./builtins/echo.def Fri Jun 3 23:14:50 1994
@@ -31,14 +31,14 @@
suppressed. If the -e option is given, interpretation of the
following backslash-escaped characters is turned on:
- \a alert (bell)
- \b backspace
- \c suppress trailing newline
- \f form feed
- \n new line
- \r carriage return
- \t horizontal tab
- \v vertical tab
- \\ backslash
- \num the character whose ASCII code is NUM (octal).
+ \a alert (bell)
+ \b backspace
+ \c suppress trailing newline
+ \f form feed
+ \n new line
+ \r carriage return
+ \t horizontal tab
+ \v vertical tab
+ \\ backslash
+ \num the character whose ASCII code is NUM (octal).
You can explicitly turn off the interpretation of the above characters
diff -u2r orig/builtins/exec.def ./builtins/exec.def
--- orig/builtins/exec.def Thu Jul 7 17:31:08 1994
+++ ./builtins/exec.def Thu Jul 7 18:29:30 1994
@@ -68,4 +68,5 @@
/* Otherwise, execve the new command with args. */
char *command, **args;
+ char *p;
int dash_name = 0;
@@ -94,5 +95,9 @@
the search path. */
if (absolute_program (args[0]))
- command = args[0];
+#ifdef atarist
+ command = find_suffixed_file (args[0]);
+#else
+ command = savestring (args[0]);
+#endif
else
command = find_user_command (args[0]);
@@ -104,5 +109,7 @@
}
- command = full_pathname (command);
+ p = full_pathname (command);
+ free (command);
+ command = p;
/* If the user wants this to look like a login shell, then
prepend a `-' onto the first argument (argv[0]). */
diff -u2r orig/builtins/let.def ./builtins/let.def
--- orig/builtins/let.def Thu Jun 2 15:35:32 1994
+++ ./builtins/let.def Fri Jun 3 23:17:12 1994
@@ -30,11 +30,11 @@
The levels are listed in order of decreasing precedence.
- - unary minus
- ! logical NOT
- * / % multiplication, division, remainder
- + - addition, subtraction
- <= >= < > comparison
- == != equality inequality
- = assignment
+ - unary minus
+ ! logical NOT
+ * / % multiplication, division, remainder
+ + - addition, subtraction
+ <= >= < > comparison
+ == != equality inequality
+ = assignment
Shell variables are allowed as operands. The name of the variable
diff -u2r orig/builtins/reserved.def ./builtins/reserved.def
--- orig/builtins/reserved.def Thu Jun 2 15:35:34 1994
+++ ./builtins/reserved.def Fri Jun 3 23:19:14 1994
@@ -85,37 +85,37 @@
BASH_VERSION The version numbers of this Bash.
CDPATH A colon separated list of directories to search
- when the argument to `cd' is not found in the current
- directory.
+ when the argument to `cd' is not found in the current
+ directory.
#if defined (HISTORY)
HISTFILE The name of the file where your command history is stored.
HISTFILESIZE The maximum number of lines this file can contain.
HISTSIZE The maximum number of history lines that a running
- shell can access.
+ shell can access.
#endif /* HISTORY */
HOME The complete pathname to your login directory.
HOSTTYPE The type of CPU this version of Bash is running under.
IGNOREEOF Controls the action of the shell on receipt of an EOF
- character as the sole input. If set, then the value
- of it is the number of EOF characters that can be seen
- in a row on an empty line before the shell will exit
- (default 10). When unset, EOF signifies the end of input.
-MAILCHECK How often, in seconds, Bash checks for new mail.
-MAILPATH A colon-separated list of filenames which Bash checks
- for new mail.
+ character as the sole input. If set, then the value
+ of it is the number of EOF characters that can be seen
+ in a row on an empty line before the shell will exit
+ (default 10). When unset, EOF signifies the end of input.
+MAILCHECK How often, in seconds, Bash checks for new mail.
+MAILPATH A colon-separated list of filenames which Bash checks
+ for new mail.
PATH A colon-separated list of directories to search when
- looking for commands.
+ looking for commands.
PROMPT_COMMAND A command to be executed before the printing of each
- primary prompt.
+ primary prompt.
PS1 The primary prompt string.
PS2 The secondary prompt string.
TERM The name of the current terminal type.
auto_resume Non-null means a command word appearing on a line by
- itself is first looked for in the list of currently
- stopped jobs. If found there, that job is foregrounded.
- A value of `exact' means that the command word must
- exactly match a command in the list of stopped jobs. A
- value of `substring' means that the command word must
- match a substring of the job. Any other value means that
- the command must be a prefix of a stopped job.
+ itself is first looked for in the list of currently
+ stopped jobs. If found there, that job is foregrounded.
+ A value of `exact' means that the command word must
+ exactly match a command in the list of stopped jobs. A
+ value of `substring' means that the command word must
+ match a substring of the job. Any other value means that
+ the command must be a prefix of a stopped job.
#if defined (HISTORY)
command_oriented_history
@@ -124,16 +124,16 @@
# if defined (BANG_HISTORY)
histchars Characters controlling history expansion and quick
- substitution. The first character is the history
- substitution character, usually `!'. The second is
- the `quick substitution' character, usually `^'. The
- third is the `history comment' character, usually `#'.
+ substitution. The first character is the history
+ substitution character, usually `!'. The second is
+ the `quick substitution' character, usually `^'. The
+ third is the `history comment' character, usually `#'.
# endif /* BANG_HISTORY */
-HISTCONTROL Set to a value of `ignorespace', it means don't enter
- lines which begin with a space or tab on the history
- list. Set to a value of `ignoredups', it means don't
- enter lines which match the last entered line. Set to
- `ignoreboth' means to combine the two options. Unset,
- or set to any other value than those above means to save
- all lines on the history list.
+HISTCONTROL Set to a value of `ignorespace', it means don't enter
+ lines which begin with a space or tab on the history
+ list. Set to a value of `ignoredups', it means don't
+ enter lines which match the last entered line. Set to
+ `ignoreboth' means to combine the two options. Unset,
+ or set to any other value than those above means to save
+ all lines on the history list.
#endif /* HISTORY */
#if defined (JOB_CONTROL)
diff -u2r orig/builtins/set.def ./builtins/set.def
--- orig/builtins/set.def Thu Jun 2 15:35:34 1994
+++ ./builtins/set.def Fri Jun 3 23:20:44 1994
@@ -71,9 +71,9 @@
notify save as -b
nounset same as -u
- physical same as -P
- posix change the behavior of bash where the default
- operation differs from the 1003.2 standard to
- match the standard
- privileged same as -p
+ physical same as -P
+ posix change the behavior of bash where the default
+ operation differs from the 1003.2 standard to
+ match the standard
+ privileged same as -p
verbose same as -v
#if defined (READLINE)
@@ -84,5 +84,5 @@
Disables processing of the $ENV file and importing of shell
functions. Turning this option off causes the effective uid and
- gid to be set to the real uid and gid.
+ gid to be set to the real uid and gid.
-t Exit after reading and executing one command.
-u Treat unset variables as an error when substituting.
diff -u2r orig/builtins/ulimit.def ./builtins/ulimit.def
--- orig/builtins/ulimit.def Thu Jul 7 17:31:14 1994
+++ ./builtins/ulimit.def Thu Jul 7 18:30:20 1994
@@ -30,17 +30,17 @@
option is given, it is interpreted as follows:
- -S use the `soft' resource limit
- -H use the `hard' resource limit
- -a all current limits are reported
- -c the maximum size of core files created
- -d the maximum size of a process's data segment
- -m the maximum resident set size
- -s the maximum stack size
- -t the maximum amount of cpu time in seconds
- -f the maximum size of files created by the shell
- -p the pipe buffer size
- -n the maximum number of open file descriptors
- -u the maximum number of user processes
- -v the size of virtual memory
+ -S use the `soft' resource limit
+ -H use the `hard' resource limit
+ -a all current limits are reported
+ -c the maximum size of core files created
+ -d the maximum size of a process's data segment
+ -m the maximum resident set size
+ -s the maximum stack size
+ -t the maximum amount of cpu time in seconds
+ -f the maximum size of files created by the shell
+ -p the pipe buffer size
+ -n the maximum number of open file descriptors
+ -u the maximum number of user processes
+ -v the size of virtual memory
If LIMIT is given, it is the new value of the specified resource.
diff -u2r orig/config.h.mini ./config.h.mini
--- orig/config.h.mini Thu Jun 2 15:35:22 1994
+++ ./config.h.mini Sat Jun 4 10:11:06 1994
@@ -146,6 +146,6 @@
/* Right now, you cannot do this on machines without fully operational
FIFO support. This currently include NeXT and Alliant. */
-#if !defined (MKFIFO_MISSING)
-# define PROCESS_SUBSTITUTION
+#if !defined (MKFIFO_MISSING) || defined (HAVE_DEV_FD)
+/* # define PROCESS_SUBSTITUTION */
#endif /* !MKFIFO_MISSING */
diff -u2r orig/cpp-Makefile ./cpp-Makefile
--- orig/cpp-Makefile Thu Jul 7 17:30:42 1994
+++ ./cpp-Makefile Sun Jul 24 12:16:10 1994
@@ -159,4 +159,12 @@
OS = M_OS
+#ifdef atarist
+BASEREL = -mbaserel
+ifdef BASEREL
+b = b
+endif
+#undef gem
+#endif
+
/**/# PROFILE_FLAGS is either -pg, to generate profiling info for use
/**/# with gprof, or nothing (the default).
@@ -299,5 +307,5 @@
/**/# other information besides optimization and debugging might be
/**/# passed to cc. A different name should have been used.
-CFLAGS = -O -g
+CFLAGS = -O2 -fomit-frame-pointer
SYSTEM_FLAGS = $(LINEBUF) $(VPRINTF) $(UNISTD) $(STDLIB) $(LIMITSH) \
@@ -307,6 +315,12 @@
-D$(Machine) -D$(OS)
LDFLAGS = $(NOSHARE) $(SYSDEP_LD) $(EXTRA_LD_PATH) $(PROFILE_FLAGS) $(CFLAGS)
+#ifdef atarist
+LDFLAGS += $(BASEREL)
+#endif
CCFLAGS = $(PROFILE_FLAGS) $(CFLAGS) $(SYSTEM_FLAGS) -DSHELL $(ALLOCA_CFLAGS) \
$(MALLOC_CFLAGS)
+#ifdef atarist
+CCFLAGS += $(BASEREL)
+#endif
CPPFLAGS= -I. -I$(srcdir) -I$(LIBSRC)
GCC_LINT_FLAGS = -ansi -Wall -Wshadow -Wpointer-arith -Wcast-qual \
@@ -369,4 +383,7 @@
$(STRCHR) -D$(Machine) -D$(OS) $(UNISTD) $(LIMITSH) \
$(STRCASE) $(STDLIB) -DSHELL
+#ifdef atarist
+LIBRARY_CFLAGS += $(BASEREL)
+#endif
/**/# These are required for sending bug reports.
@@ -550,5 +567,9 @@
TERMCAP_LIBRARY = -lcurses
# else /* !USE_TERMCAP_EMULATION */
+#ifdef atarist
+TERMCAP_LIBRARY = -l$btermcap
+#else
TERMCAP_LIBRARY = -ltermcap
+#endif
# endif /* !USE_TERMCAP_EMULATION */
#endif /* !USE_GNU_TERMCAP */
@@ -660,5 +681,9 @@
TERMCAP_LIB = -lcurses
# else /* !USE_TERMCAP_EMULATION */
+#ifdef atarist
+TERMCAP_LIB = -l$btermcap
+#else
TERMCAP_LIB = -ltermcap
+#endif
# endif /* !USE_TERMCAP_EMULATION */
@@ -937,5 +962,5 @@
$(DEFDIR)times.def $(DEFDIR)trap.def $(DEFDIR)type.def \
$(DEFDIR)ulimit.def $(DEFDIR)umask.def $(DEFDIR)wait.def \
- $(DEFDIR)getopts.def $(DEFDIR)reserved.def
+ $(DEFDIR)getopts.def $(DEFDIR)reserved.def $(DEFDIR)gem.def
BUILTIN_C_SRC = $(DEFDIR)mkbuiltins.c $(DEFDIR)common.c \
$(DEFDIR)hashcom.h $(DEFDIR)/bashgetopt.c $(GETOPT_SOURCE)
@@ -953,5 +978,5 @@
$(DEFDIR)times.o $(DEFDIR)trap.o $(DEFDIR)type.o \
$(DEFDIR)ulimit.o $(DEFDIR)umask.o $(DEFDIR)wait.o \
- $(BUILTIN_C_OBJ)
+ $(DEFDIR)gem.o $(BUILTIN_C_OBJ)
#if defined (GETOPTS_BUILTIN)
GETOPTS_OBJ = $(DEFDIR)getopts.o
@@ -1023,5 +1048,10 @@
$(PURIFY) $(CC) $(LDFLAGS) $(LIBRARY_LDFLAGS) -o $(Program) $(OBJECTS) $(LIBRARIES)
ls -l $(Program)
+#ifdef atarist
+ -fixstk 20k $@
+ -size68 $@
+#else
size $(Program)
+#endif
.build: $(SOURCES) cpp-Makefile newversion.aux
@@ -1426,4 +1456,5 @@
builtins/umask.o: builtins/umask.def
builtins/wait.o: builtins/wait.def
+builtins/gem.o: builtins/gem.def
$(Program).tar: $(THINGS_TO_TAR) .distribution
@@ -1442,5 +1473,5 @@
$(INSTALL_PROGRAM) $(Program) $(bindir)/$(Program)
-if [ -f $(bindir)/bashbug ]; \
- then mv $(bindir)/bashbug $(bindir)$bashbug.old; \
+ then mv $(bindir)/bashbug $(bindir)/bashbug.old; \
fi
$(INSTALL_PROGRAM) bashbug $(bindir)/bashbug
diff -u2r orig/documentation/Makefile ./documentation/Makefile
--- orig/documentation/Makefile Thu Jul 7 17:31:16 1994
+++ ./documentation/Makefile Thu Jul 7 18:35:34 1994
@@ -9,8 +9,8 @@
TEXINDEX = $(DOC_SUPPORT)texindex
TEXINDSRC = $(DOC_SUPPORT)texindex.c
-TEX = tex
+TEXI2DVI = texi2dvi
QUIETPS = #set this to -q to shut up dvips
-DVIPS = dvips -D 300 $(QUIETPS) -o $@ # tricky
-TEXINPUTS = ./../lib/readline/doc
+DVIPS = dvips $(QUIETPS) -o $@ # tricky
+TEXINPUTDIR = ./../lib/readline/doc
MAKEINFO = makeinfo
@@ -52,7 +52,5 @@
features.dvi: features.texi $(HSUSER) $(RLUSER)
- TEXINPUTS=.:$(TEXINPUTS):$$TEXINPUTS $(TEX) features.texi
- $(TEXINDEX) features.??
- TEXINPUTS=.:$(TEXINPUTS):$$TEXINPUTS $(TEX) features.texi
+ TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) features.texi
features.ps: features.dvi
@@ -61,10 +59,8 @@
features.info: features.texi $(HSUSER) $(RLUSER)
- $(MAKEINFO) --no-split -I$(TEXINPUTS) features.texi
+ $(MAKEINFO) --no-split -I$(TEXINPUTDIR) features.texi
bash.dvi: $(TEXINDEX) bash.texinfo $(HSUSER) $(RLUSER)
- TEXINPUTS=.:$(TEXINPUTS):$$TEXINPUTS $(TEX) bash.texinfo
- $(TEXINDEX) bash.??
- TEXINPUTS=.:$(TEXINPUTS):$$TEXINPUTS $(TEX) bash.texinfo
+ TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) bash.texinfo
bashman.ps: bash.dvi
diff -u2r orig/documentation/readline.3 ./documentation/readline.3
--- orig/documentation/readline.3 Thu Jul 7 17:31:20 1994
+++ ./documentation/readline.3 Thu Jul 7 18:37:12 1994
@@ -79,4 +79,6 @@
.ft
.fi
+.LP
+.nf
.ft B
int rl_macro_bind (keyseq, macro, keymap)
@@ -92,6 +94,4 @@
.ft
.fi
-.LP
-.nf
.LP
.nf
diff -u2r orig/execute_cmd.c ./execute_cmd.c
--- orig/execute_cmd.c Thu Jul 7 17:30:46 1994
+++ ./execute_cmd.c Thu Jul 7 18:41:28 1994
@@ -2099,4 +2099,10 @@
}
+#ifdef atarist
+ /* Clear any ouput errors from redirected builtins. */
+ clearerr (stdout);
+ clearerr (stderr);
+#endif
+
return (result);
}
@@ -2116,4 +2122,39 @@
}
+#if defined (atarist)
+static char *const suffixes[] = { ".ttp", ".tos", ".prg", ".app", ".gtp" };
+
+#define N_SUFFIXES (sizeof (suffixes) / sizeof (suffixes[0]))
+#define MAX_SUFFIX_LEN 4
+
+char *
+find_suffixed_file (name)
+ char *name;
+{
+ char *basename = strrchr (name, '/');
+
+ if (strchr (basename ? basename : name, '.') == NULL)
+ {
+ int i, status, name_len = strlen (name);
+ char *name_suffix = alloca (name_len + MAX_SUFFIX_LEN + 1);
+
+ status = file_status (name);
+ if (status & FS_EXISTS)
+ return savestring (name);
+
+ strcpy (name_suffix, name);
+ for (i = 0; i < N_SUFFIXES; i++)
+ {
+ strcpy (name_suffix + name_len, suffixes[i]);
+ status = file_status (name_suffix);
+
+ if (status & FS_EXECABLE)
+ return savestring (name_suffix);
+ }
+ }
+ return savestring (name);
+}
+#endif
+
/* Execute a simple command that is hopefully defined in a disk file
somewhere.
@@ -2195,5 +2236,9 @@
/* A command containing a slash is not looked up in PATH or saved in
the hash table. */
+#ifdef atarist
+ command = find_suffixed_file (pathname);
+#else
command = savestring (pathname);
+#endif
else
{
@@ -2359,4 +2404,12 @@
args[larry] = (char *)NULL;
+#ifdef atarist
+ {
+ char *p = find_suffixed_file (execname);
+ free (execname);
+ execname = p;
+ }
+#endif
+
return (shell_execve (execname, args, env));
}
@@ -3497,5 +3550,9 @@
if (absolute_program (name))
{
+#ifdef atarist
+ full_path = xmalloc (1 + MAX_SUFFIX_LEN + name_len);
+#else
full_path = xmalloc (1 + name_len);
+#endif
strcpy (full_path, name);
@@ -3505,4 +3562,21 @@
if (!(status & FS_EXISTS))
{
+#ifdef atarist
+ char *basename = strrchr (name, '/');
+ if (strchr (basename ? basename : name, '.') == NULL)
+ {
+ int i;
+
+ for (i = 1; i < N_SUFFIXES; i++)
+ {
+ strcpy (full_path + name_len, suffixes[i]);
+ status = file_status (full_path);
+
+ if (flags & FS_EXEC_ONLY
+ ? status & FS_EXECABLE : status & FS_EXISTS)
+ return full_path;
+ }
+ }
+#endif
free (full_path);
return ((char *)NULL);
@@ -3552,5 +3626,9 @@
dot_found_in_search = 1;
+#ifdef atarist
+ full_path = make_full_pathname (path, name, name_len + MAX_SUFFIX_LEN);
+#else
full_path = make_full_pathname (path, name, name_len);
+#endif
free (path);
@@ -3558,5 +3636,38 @@
if (!(status & FS_EXISTS))
+#ifndef atarist
goto next_file;
+#else
+ {
+ if (strchr (name, '.') == NULL)
+ {
+ int i, len = strlen (full_path);
+
+ for (i = 0; i < N_SUFFIXES; i++)
+ {
+ strcpy (full_path + len, suffixes[i]);
+ status = file_status (full_path);
+ if (status & FS_EXISTS)
+ {
+ if (flags & FS_EXISTS)
+ return full_path;
+ if (status & FS_EXECABLE)
+ {
+ if (file_to_lose_on)
+ free (file_to_lose_on);
+
+ return full_path;
+ }
+ if (flags & FS_EXEC_PREFERRED)
+ {
+ if (!file_to_lose_on)
+ file_to_lose_on = savestring (full_path);
+ }
+ }
+ }
+ }
+ goto next_file;
+ }
+#endif
/* The file exists. If the caller simply wants the first file,
diff -u2r orig/execute_cmd.h ./execute_cmd.h
--- orig/execute_cmd.h Thu Jun 2 15:35:26 1994
+++ ./execute_cmd.h Fri Jun 3 23:16:18 1994
@@ -35,4 +35,7 @@
extern char *find_user_command __P((char *));
extern char *find_path_file __P((char *));
+#ifdef atarist
+extern char *find_suffixed_file __P((char *));
+#endif
extern char *user_command_matches __P((char *, int, int));
extern int same_file __P((char *, char *, struct stat *, struct stat *));
diff -u2r orig/general.c ./general.c
--- orig/general.c Thu Jul 7 17:30:46 1994
+++ ./general.c Thu Jul 7 18:49:44 1994
@@ -732,5 +732,5 @@
}
-#if !defined (HAVE_STRCASECMP)
+#if !defined (HAVE_STRCASECMP) && !defined (HAVE_STRICMP)
#if !defined (to_upper)
@@ -775,5 +775,5 @@
return (*string1 - *string2);
}
-#endif /* !HAVE_STRCASECMP */
+#endif /* !HAVE_STRCASECMP && !HAVE_STRICMP */
/* Determine if s2 occurs in s1. If so, return a pointer to the
diff -u2r orig/general.h ./general.h
--- orig/general.h Thu Jul 7 17:30:48 1994
+++ ./general.h Thu Jul 7 18:48:48 1994
@@ -209,6 +209,8 @@
#if !defined (HAVE_STRCASECMP)
+#if !defined (HAVE_STRICMP)
extern int strnicmp __P((char *, char *, int));
extern int stricmp __P((char *, char *));
+#endif /* HAVE_STRICMP */
#else /* HAVE_STRCASECMP */
# define stricmp strcasecmp
diff -u2r orig/jobs.c ./jobs.c
--- orig/jobs.c Thu Jul 7 17:30:50 1994
+++ ./jobs.c Thu Jul 7 18:50:20 1994
@@ -192,5 +192,5 @@
#endif
-#if !defined (_POSIX_VERSION)
+#if !defined (_POSIX_VERSION) && !defined (atarist)
/* These are definitions to map POSIX 1003.1 functions onto existing BSD
@@ -1912,5 +1912,5 @@
wait3 ((union wait *)statusp, options, (struct rusage *)0)
#else
-# if defined (_POSIX_VERSION)
+# if defined (_POSIX_VERSION) || defined (atarist)
# define WAITPID(pid, statusp, options) \
waitpid ((pid_t)pid, statusp, options)
@@ -2234,5 +2234,5 @@
/* getpgrp () varies between systems. Even systems that claim to be
Posix.1 compatible lie sometimes (Ultrix, SunOS4, apollo). */
-#if defined (_POSIX_VERSION) && !defined (BSD_GETPGRP)
+#if defined (_POSIX_VERSION) && !defined (BSD_GETPGRP) || defined (atarist)
# define getpgid(p) getpgrp ()
#else
diff -u2r orig/jobs.h ./jobs.h
--- orig/jobs.h Thu Jun 2 15:35:24 1994
+++ ./jobs.h Fri Jun 3 23:28:24 1994
@@ -235,5 +235,5 @@
#endif /* !SIGCHLD */
-#if !defined (_POSIX_VERSION)
+#if !defined (_POSIX_VERSION) && !defined (atarist)
# if !defined (SIG_BLOCK)
# define SIG_BLOCK 2
@@ -272,5 +272,5 @@
sigprocmask (SIG_BLOCK, &nvar, &ovar)
-#if defined (_POSIX_VERSION)
+#if defined (_POSIX_VERSION) || defined (atarist)
# define BLOCK_CHILD(nvar, ovar) \
BLOCK_SIGNAL (SIGCHLD, nvar, ovar)
diff -u2r orig/lib/glob/Makefile ./lib/glob/Makefile
--- orig/lib/glob/Makefile Fri Jun 3 22:03:16 1994
+++ ./lib/glob/Makefile Sat Jun 4 10:01:34 1994
@@ -68,5 +68,5 @@
documentation: force
- -(cd doc; $(MAKE) $(MFLAGS))
+ -cd doc && $(MAKE) $(MFLAGS)
force:
@@ -81,5 +81,5 @@
clean:
rm -f $(OBJECTS) $(LIBRARY_NAME)
- -(cd doc; $(MAKE) $(MFLAGS) clean)
+ -cd doc && $(MAKE) $(MFLAGS) clean
diff -u2r orig/lib/readline/bind.c ./lib/readline/bind.c
--- orig/lib/readline/bind.c Thu Jul 7 17:31:22 1994
+++ ./lib/readline/bind.c Thu Jul 7 18:53:32 1994
@@ -96,6 +96,8 @@
#define strnicmp strncasecmp
#else
+#if !defined (HAVE_STRICMP)
static int stricmp (), strnicmp ();
#endif
+#endif
#if defined (STATIC_MALLOC)
@@ -1427,5 +1429,5 @@
}
-#if !defined (HAVE_STRCASECMP)
+#if !defined (HAVE_STRCASECMP) && !defined (HAVE_STRICMP)
/* Whoops, Unix doesn't have strnicmp. */
@@ -1467,5 +1469,5 @@
return (*string1 - *string2);
}
-#endif /* !HAVE_STRCASECMP */
+#endif /* !HAVE_STRCASECMP && !HAVE_STRICMP */
/* Determine if s2 occurs in s1. If so, return a pointer to the
diff -u2r orig/lib/readline/complete.c ./lib/readline/complete.c
--- orig/lib/readline/complete.c Thu Jul 7 17:31:24 1994
+++ ./lib/readline/complete.c Thu Jul 7 20:47:42 1994
@@ -145,5 +145,5 @@
/* Local variable states what happened during the last completion attempt. */
-static int completion_changed_buffer = 0;
+static int completion_was_ambigous = 0;
/* Complete the word at or before point. You have supplied the function
@@ -154,5 +154,5 @@
int ignore, invoking_key;
{
- if (rl_last_func == rl_complete && !completion_changed_buffer)
+ if (rl_last_func == rl_complete && completion_was_ambigous)
return (rl_complete_internal ('?'));
else if (_rl_complete_show_all)
@@ -366,14 +366,9 @@
Function *our_func;
int start, scan, end, delimiter = 0, pass_next;
- char *text, *saved_line_buffer;
+ char *text;
char *replacement;
char quote_char = '\0';
int found_quote = 0;
- if (rl_line_buffer)
- saved_line_buffer = savestring (rl_line_buffer);
- else
- saved_line_buffer = (char *)NULL;
-
if (rl_completion_entry_function)
our_func = rl_completion_entry_function;
@@ -529,5 +524,4 @@
int j, newlen = 0;
char dead_slot;
- char **temp_array;
/* Sort the items. */
@@ -553,17 +547,15 @@
/* We have marked all the dead slots with (char *)&dead_slot.
Copy all the non-dead entries into a new array. */
- temp_array = (char **)xmalloc ((3 + newlen) * sizeof (char *));
for (i = j = 1; matches[i]; i++)
{
if (matches[i] != (char *)&dead_slot)
- temp_array[j++] = matches[i];
+ matches[j++] = matches[i];
}
- temp_array[j] = (char *)NULL;
+ matches[j] = (char *)NULL;
if (matches[0] != (char *)&dead_slot)
free (matches[0]);
- free (matches);
- matches = temp_array;
+ matches = (char **)xrealloc (matches, (j + 1) * sizeof (char *));
/* Place the lowest common denominator back in [0]. */
@@ -880,18 +872,9 @@
}
+ completion_was_ambigous = matches[1] != NULL;
+
for (i = 0; matches[i]; i++)
free (matches[i]);
free (matches);
- }
-
- /* Check to see if the line has changed through all of this manipulation. */
- if (saved_line_buffer)
- {
- if (strcmp (rl_line_buffer, saved_line_buffer) != 0)
- completion_changed_buffer = 1;
- else
- completion_changed_buffer = 0;
-
- free (saved_line_buffer);
}
return 0;
diff -u2r orig/lib/readline/isearch.c ./lib/readline/isearch.c
--- orig/lib/readline/isearch.c Thu Jul 7 17:31:30 1994
+++ ./lib/readline/isearch.c Thu Jul 7 21:07:24 1994
@@ -326,4 +326,7 @@
ding ();
i = last_found_line;
+ line_index = rl_point;
+ if (c >= 32 && c <= 126)
+ search_string[--search_string_index] = '\0';
continue; /* XXX - was break */
}
diff -u2r orig/lib/readline/readline.c ./lib/readline/readline.c
--- orig/lib/readline/readline.c Thu Jul 7 17:31:34 1994
+++ ./lib/readline/readline.c Sun Jul 24 09:03:56 1994
@@ -531,6 +531,8 @@
fcntl (tty, F_SETFL, flags);
+#ifndef atarist
if (chars_avail == -1 && errno == EAGAIN)
return;
+#endif
}
#endif /* O_NDELAY */
@@ -3248,4 +3250,5 @@
}
+#if 0
#if !defined (SHELL)
#ifdef savestring
@@ -3254,9 +3257,11 @@
/* Backwards compatibilty, now that savestring has been removed from
all `public' readline header files. */
+char *
savestring (s)
char *s;
{
- return ((char *)strcpy (xmalloc (1 + (int)strlen (x)), (x)));
+ return ((char *)strcpy (xmalloc (1 + (int)strlen (s)), (s)));
}
+#endif
#endif
diff -u2r orig/lib/tilde/Makefile ./lib/tilde/Makefile
--- orig/lib/tilde/Makefile Fri Jun 3 22:31:54 1994
+++ ./lib/tilde/Makefile Thu Jul 7 21:26:06 1994
@@ -70,5 +70,5 @@
documentation: force
- -(cd doc; $(MAKE) $(MFLAGS))
+ -cd doc && $(MAKE) $(MFLAGS)
force:
@@ -83,5 +83,5 @@
clean:
$(RM) -f $(OBJECTS) $(LIBRARY_NAME)
- -(cd doc; $(MAKE) $(MFLAGS) clean)
+ -cd doc && $(MAKE) $(MFLAGS) clean
diff -u2r orig/machines.h ./machines.h
--- orig/machines.h Thu Jul 7 17:30:52 1994
+++ ./machines.h Thu Jul 7 21:11:46 1994
@@ -1923,4 +1923,54 @@
#endif /* cadmus */
+/* ******************************* */
+/* */
+/* Atari ST running MiNT */
+/* */
+/* ******************************* */
+#if defined (atarist)
+#define M_MACHINE "atari"
+#define M_OS "MiNT"
+#define HAVE_POSIX_SIGNALS
+#define HAVE_VFPRINTF
+#define HAVE_SETLINEBUF
+#define HAVE_STRCHR
+#define HAVE_STRERROR
+#define HAVE_GETGROUPS
+#define HAVE_DUP2
+#define HAVE_GETPAGESIZE
+#define HAVE_GETDTABLESIZE
+#define HAVE_SYS_SIGLIST
+#define SYSDEP_CFLAGS -DHAVE_BCOPY -DHAVE_UID_T -DMKFIFO_MISSING -DHAVE_STRICMP
+#undef USE_GNU_MALLOC
+#define HAVE_FIXED_INCLUDES
+#define HAVE_DIRENT
+#define VOID_SIGHANDLER
+#endif
+
+/* ********************* */
+/* */
+/* Linux/m68k */
+/* */
+/* ********************* */
+#if defined (__mc68000__) && (defined (__linux__) || defined (linux))
+# define M_MACHINE "m68k"
+# define M_OS "Linux"
+# define SYSDEP_CFLAGS -DHAVE_BCOPY -DHAVE_GETPW_DECLS -DHAVE_GETHOSTNAME
+# define REQUIRED_LIBRARIES
+# define HAVE_GETGROUPS
+# define HAVE_STRERROR
+# define VOID_SIGHANDLER
+# define HAVE_POSIX_SIGNALS
+# define HAVE_SYS_SIGLIST
+# define HAVE_VFPRINTF
+# define HAVE_VARARGS_H
+# if defined (__GNUC__)
+# define HAVE_FIXED_INCLUDES
+# endif /* __GNUC__ */
+# undef USE_GNU_MALLOC
+# undef HAVE_SETLINEBUF
+# define HAVE_STRCASECMP
+#endif /* __mc68000__ && __linux__ */
+
/* **************************************************************** */
/* */
diff -u2r orig/nojobs.c ./nojobs.c
--- orig/nojobs.c Thu Jul 7 17:30:54 1994
+++ ./nojobs.c Thu Jul 7 21:14:46 1994
@@ -59,9 +59,9 @@
#endif /* USG || _POSIX_VERSION */
-#if defined (USG)
+#if defined (USG) || defined (atarist)
# define siginterrupt(sig, code)
#endif /* USG */
-#if defined (_POSIX_VERSION)
+#if defined (_POSIX_VERSION) || defined (atarist)
# define WAITPID(pid, statusp, options) waitpid (pid, statusp, options)
#else
diff -u2r orig/parse.y ./parse.y
--- orig/parse.y Thu Jul 7 17:30:58 1994
+++ ./parse.y Thu Jul 7 21:15:10 1994
@@ -51,5 +51,4 @@
#endif /* PROMPT_STRING_DECODE */
-#define YYDEBUG 1
extern int eof_encountered;
extern int no_line_editing;
diff -u2r orig/shell.c ./shell.c
--- orig/shell.c Thu Jul 7 17:31:00 1994
+++ ./shell.c Thu Jul 7 21:15:50 1994
@@ -331,6 +331,4 @@
act_like_sh++;
- yydebug = 0;
-
shell_environment = env;
shell_name = argv[0];
@@ -505,5 +503,7 @@
}
+#ifndef atarist
#define CLOSE_FDS_AT_LOGIN
+#endif
#if defined (CLOSE_FDS_AT_LOGIN)
/*
@@ -1725,4 +1725,5 @@
}
+#ifndef atarist
#if !defined (USG) && defined (ENOTSOCK)
# if !defined (HAVE_SOCKETS)
@@ -1734,4 +1735,5 @@
#include <sys/socket.h>
#endif
+#endif
/* Is FD a socket or network connection? */
@@ -1740,4 +1742,7 @@
int fd;
{
+#ifdef atarist
+ return 0;
+#else
#if defined (USGr4) || defined (USGr4_2)
/* Sockets on SVR4 and SVR4.2 are character special (streams) devices. */
@@ -1767,3 +1772,4 @@
# endif /* !HAVE_SOCKETS */
#endif /* !USGr4 && !USGr4_2 */
+#endif /* !atarist */
}
diff -u2r orig/subst.c ./subst.c
--- orig/subst.c Thu Jul 7 17:31:02 1994
+++ ./subst.c Thu Jul 7 21:18:22 1994
@@ -1887,4 +1887,9 @@
old_pipeline_pgrp = pipeline_pgrp;
pipeline_pgrp = shell_pgrp;
+#ifdef atarist
+ /* Avoid race condition. Since fork () is blocking, we don't have
+ the chance to set the SIGCHLD handler before the child dies. */
+ set_sigchld_handler ();
+#endif
pid = make_child ((char *)NULL, 1);
if (pid == 0)
@@ -2022,4 +2027,9 @@
pipeline_pgrp = shell_pgrp;
+#ifdef atarist
+ /* Avoid race condition. Since fork () is blocking, we don't have
+ the chance to set the SIGCHLD handler before the child dies. */
+ set_sigchld_handler ();
+#endif
pid = make_child ((char *)NULL, 0);
if (pid == 0)
diff -u2r orig/support/srcdir ./support/srcdir
--- orig/support/srcdir Thu Jun 2 15:36:16 1994
+++ ./support/srcdir Thu Jul 7 21:32:54 1994
@@ -6,6 +6,6 @@
case "$1" in
-'.') pwd ;;
-*) echo "$1" ;;
+/*) echo "$1" ;;
+*) cd $1; pwd ;;
esac